/**
 * jml预编译
 * 
 */
(function(Jml,DataHeplper) {
	var Core = Ccay.Core;
	Core._originalAjax = Core.ajax;

	Core._Delegates.ajax_Sucess.add(function(type, ui,ajax){
		Jml.activePage && Jml.activePage.completeRequest(true,ajax);
	});
	
	Core._Delegates.ajax_Error.add(function(type, ui,ajax){
		Jml.activePage && Jml.activePage.completeRequest(false,ajax);
	});
	
	Core.ajax = function(ops,ui){
		if(Jml.activePage)
			Jml.activePage.addRequest(ops);
		else
			Core._originalAjax(ops,ui);
	}
	
})(Ccay.Jml, Ccay.DataHelper);